<h4>KARTU RENCANA STUDI &raquo; ENTRI KARTU RENCANA STUDI &raquo; <span class="current_page">TAMBAH MATA KULIAH</span></h4>

            <!-- Begin three column window -->
<div class="onecolumn" style="padding-bottom:20px">
    <div class="header">
    <span>MATAKULIAH DITAWARKAN SEMESTER <?php echo strtoupper($kontrol->SEMESTER).' '.$kontrol->TAHUN_AJARAN ?></span>
	</div>
	<br class="clear"/>


<form method="post" name="mkform" action="<?php echo base_url().'siam/tambah-mk.html' ?>">
<p>
 <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#CCC" align="center">
           <tr class="font_white" bgcolor="#000000" align="center">
                <th width="40" height="40">No.</th>
                <th width="50">Hari</th>
                <th width="87">Jam</th>
                <th width="70">Kode MK</th>
                <th width="210">Nama MK</th>
                <th width="50">Kelas</th>
                <th width="30">SKS</th>
                <th width="50">W/P</th>
                <th width="30">Pst.</th>
                <th width="46">Kuota</th>
                <th width="120">Prasyarat</th>
            </tr>

            <?php if($getDataMkDitawarkan): ?>

            <?php $seq_number =1; ?>
            <?php foreach($getDataMkDitawarkan as $mk): ?>
            <?php $jumlah_peminat = $this->akad_model->jumlahPeminatMk($mk->ID_MK_TERSEDIA); ?>
            <?php $cek_prasyarat_mk = $this->krs_library->check_prasyarat_mk($this->session->userdata('siamunp_user'),$mk->KODE_PRASYARAT1, $mk->KODE_PRASYARAT2); ?>
            <?php $mk_prasyarat1 = $this->akad_model->getKodeMkByNoMk($mk->KODE_PRASYARAT1);?>
            <?php $mk_prasyarat2 = $this->akad_model->getKodeMkByNoMk($mk->KODE_PRASYARAT2);?>

            <?php $has_entried = 0; ?>
            <?php if($krs): ?>
            <?php foreach($krs as $krsValue):?>
               <?php if ($mk->KODE_MK == $krsValue->KODE_MK): ?>
                      <?php $has_entried = 1;?>
               <?php endif; ?>
            <?php endforeach; ?>
            <?php endif; ?>


            <tr style="color:#000" align="center">
              <td height="28"><?php echo $seq_number; ?>.
               <input type="checkbox" value="<?php echo $mk->ID_MK_TERSEDIA ?>" name="mk" onClick="javascript:checkBoxValidate(<?php echo $seq_number-1; ?>)" <?php if( ($jumlah_peminat < $mk->KAPASITAS) && ($cek_prasyarat_mk > 0) && ($has_entried == 0) ): ?> <?php else: ?>DISABLED <?php endif; ?> />
              </td>
              <td align="left" style="padding-left:10px"><?php echo ucwords(strtolower($mk->HARI)); ?></td>
              <td><?php echo $mk->MULAI.' - '.$mk->SELESAI; ?></td>
              <td><?php echo strtoupper($mk->KODE_MK); ?></td>
              <td align="left" style="padding-left:10px"><?php echo ucwords(strtolower($mk->NAMA_MK)); ?></td>
              <td><?php echo $mk->KELAS ?></td>
              <td><?php echo $mk->SKS ?></td>
              <td><?php echo $mk->SIFAT ?></td>
              <td><?php echo $jumlah_peminat ?></td>
              <td><?php echo $mk->KAPASITAS ?></td>
              <td><?php if($mk->KODE_PRASYARAT1):?><?php echo $mk_prasyarat1->KODE_MK ?> <?php endif; ?> <?php if($mk->KODE_PRASYARAT1 && $mk->KODE_PRASYARAT2):?><?php echo ','?><?php endif;?> <?php if($mk->KODE_PRASYARAT2):?><?php echo $mk_prasyarat2->KODE_MK ?><?php endif; ?></td>
            </tr>

            <?php $seq_number++; ?>
            <?php endforeach; ?>

            <?php else: ?>

            <tr>
              <td height="28" colspan="11" style="padding-left:20px">Data tidak tersedia.</td>
            </tr>

            <?php endif; ?>

   </table>
</p>
<br /><br />
   <div align="center">
     <input type="submit" class="button" value="&nbsp; Pilih &nbsp;" name="Pilih">
     <input type="button" class="button" value="&nbsp; Batal &nbsp;" name="batal" onClick="self.location='entri-krs.html'">
   </div>

</form>


<div class="separator_closer">&nbsp;</div>

</div>

</div>